package com.itheima.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.bean.Setmeal;
import com.itheima.dto.SetmealDto;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface SetmealService extends IService<Setmeal> {
    /**
     * 新增套餐
     *
     * @param setmealDto
     */
    @Transactional
    void saveWithDishes(SetmealDto setmealDto);

    /**
     * 删除套餐
     *
     * @param ids
     */
    @Transactional
    void deleteWithDishes(Long[] ids);

    SetmealDto getSetmealById(Long id);

    @Transactional
    void updateSetmeal(SetmealDto setmealDto);

    @Transactional
    List<Setmeal> startAndStop(Long[] ids, String status);
}
